Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Message tooltip was rendered in an old position [web] #242

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

def-au1t
Copy link
Contributor

Description:

This PR contains a small fix for an issue with web tooltip, that was rendered in incorrect position, when the screen was scrolled before opening it. In particular, after entering mouse over the message for the first time, the tooltip was not opening at all.

The source of the issue was introduced probably in this commit (cc: @palys-swm). Originally (almost a year ago when I created that logic) in onMouseEnter handler, findTooltipPosition was called with message position calculated directly from getBoundingClientRect, but after the problem was introduced, it was called with position kept in the state, that was not updated until the next render.

Resources:

Videos demonstrating the tooltip behavior before and after the fix:

Before:

comm_before_fix.mp4

After:

comm_after_fix.mp4

@CLAassistant
Copy link

CLAassistant commented Jul 16, 2023

CLA assistant check
All committers have signed the CLA.

@Ashoat Ashoat requested a review from palys-swm July 16, 2023 22:03
Copy link
Contributor

@Ashoat Ashoat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes sense to me, but I would love if @palys-swm could take a look too.

Thanks for taking the time to fix this bug @def-au1t – it's really appreciated!! This is probably our first real PR :)

Copy link
Collaborator

@palys-swm palys-swm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it and it works great! Thanks for creating the PR!

@Ashoat Ashoat merged commit 32f72d9 into CommE2E:master Jul 17, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants